課程概述 |
編譯器是歷史最悠久的計算機程式之一,負責把利用高階語言撰寫的程式轉成低階語言的格式,以利底層平台(虛擬機器、作業系統、硬體等)的執行。編譯器是支程式,但不是會寫程式的人就會寫編譯器。理由之一,編譯器很大,要撰寫維護如此規模的程式必須擁有更精進的程式技巧與經驗。理由之二,編譯器開發至今已有很完備的理論基礎,脫離了這些理論要寫出有用的編譯器,縱使不是緣木求魚也一定事倍功半。
本課程將談論編譯器的理論與實作。至於編譯器課程的重要性,底下文字摘錄自 ACM 以及 IEEE Computer Society 主導之 2008 年版計算機科學課程規劃書: Several industrialists passed very positive comment about compiler courses. Although many companies do not engage in anything related to compilers, compiler writing tended to be seen as a microcosm for realistic software development. So good compiler writers are often seen as desirable; they tend to be good software engineers.
課程大綱:
* compiler structure
* regular expression & context-free grammar
* lexical analysis
* syntactic analysis
* compiler construction tools
* symbol table management
* semantic analysis
* intermediate code synthesis
* runtime memory management
* basic optimization
* target code generation |